package com.pureut.quality.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.quality.service.QualityPatrolBadSampleService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/***
 * 巡检不良样本表
 * Author:C
 * Date:2023/02/13 13:48
 * @DESC
 */
@RestController
@RequestMapping("/quality-patrol-bad-sample")
public class QualityPatrolBadSampleController extends BaseController {

    @Resource
    QualityPatrolBadSampleService qualityPatrolBadSampleService;

    /**
     * 巡检不良样本列表
     */
    @GetMapping("/list")
    public AjaxResult patrolBadSampleList(String patrolInspectionSheetNo) {
        return AjaxResult.success(qualityPatrolBadSampleService.patrolBadSampleList(patrolInspectionSheetNo));
    }

    /**
     * 删除
     */
    @DeleteMapping("/delete/{id}")
    public AjaxResult deleteById(@PathVariable("id") Long id) {
        return toAjax(qualityPatrolBadSampleService.getDeleteById(id));
    }
}
